package com.ruoyi.stock2.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock2.mapper.TRADEDATA2Mapper;
import com.ruoyi.stock2.domain.TRADEDATA2;
import com.ruoyi.stock2.service.ITRADEDATA2Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 交易数据2Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-03-01
 */
@Service
public class TRADEDATA2ServiceImpl implements ITRADEDATA2Service 
{
    @Autowired
    private TRADEDATA2Mapper tRADEDATA2Mapper;

    /**
     * 查询交易数据2
     * 
     * @param id 交易数据2ID
     * @return 交易数据2
     */
    @Override
    public TRADEDATA2 selectTRADEDATA2ById(Long id)
    {
        return tRADEDATA2Mapper.selectTRADEDATA2ById(id);
    }

    /**
     * 查询交易数据2列表
     * 
     * @param tRADEDATA2 交易数据2
     * @return 交易数据2
     */
    @Override
    public List<TRADEDATA2> selectTRADEDATA2List(TRADEDATA2 tRADEDATA2)
    {
        return tRADEDATA2Mapper.selectTRADEDATA2List(tRADEDATA2);
    }

    /**
     * 新增交易数据2
     * 
     * @param tRADEDATA2 交易数据2
     * @return 结果
     */
    @Override
    public int insertTRADEDATA2(TRADEDATA2 tRADEDATA2)
    {
        return tRADEDATA2Mapper.insertTRADEDATA2(tRADEDATA2);
    }

    /**
     * 修改交易数据2
     * 
     * @param tRADEDATA2 交易数据2
     * @return 结果
     */
    @Override
    public int updateTRADEDATA2(TRADEDATA2 tRADEDATA2)
    {
        return tRADEDATA2Mapper.updateTRADEDATA2(tRADEDATA2);
    }

    /**
     * 删除交易数据2对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTRADEDATA2ByIds(String ids)
    {
        return tRADEDATA2Mapper.deleteTRADEDATA2ByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除交易数据2信息
     * 
     * @param id 交易数据2ID
     * @return 结果
     */
    @Override
    public int deleteTRADEDATA2ById(Long id)
    {
        return tRADEDATA2Mapper.deleteTRADEDATA2ById(id);
    }
}
